package com.alan.sso.share.bean;

import cn.hutool.core.codec.Base64;
import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.symmetric.AES;
import lombok.Data;

/**
 * @Auther: Alan liu
 * @Date: 2018/12/21 10:27
 * @Description: SsoUser
 */
@Data
public class SsoUser {
    private Long id;
    private String userName;
    private String mobile;

    public static void main(String[] args) {
        String key = "wefwerfwerwr1415efefetdfetfefedf";
        AES ase1 = SecureUtil.aes(key.getBytes());
        AES ase2 = SecureUtil.aes(key.getBytes());
        String str1 = Base64.encode(ase1.encrypt("123456"));
        System.out.println(str1);
        System.out.println(ase2.decryptStr(Base64.decode(str1)));
    }
}
